#include "TestGameScene.h"
#include "MainLayer.h"
#include "InputLayer.h"
#include "GameBackground.h"
#include "Effect.h"

TestGameScene::TestGameScene(void)
{
}


TestGameScene::~TestGameScene(void)
{
}

bool TestGameScene::init()
{
	if (!CCScene::init())
		return false;

	bool bRet = false;
	do 
	{
		// Init game
		
		CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("resource.plist");
		CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("wsparticle_p01.plist");
		CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("Enemy.plist");
		CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("Pets.plist");
		CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("Bullet.plist");
		CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("Items.plist");
		CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("Boss.plist");
		CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("UIs.plist");

		CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("shield_resources.plist");

 		MainLayer* main = MainLayer::create();
		addChild(main, 1, MAINLAYER_TAG);
 		InputLayer* input = InputLayer::create();
		addChild(input, 2, INPUTLAYER_TAG);
 		GameBackground* bg = GameBackground::create();
 		addChild(bg, 0, BACKGROUNDLAYER_TAG);

		// success
		bRet = true;
	} while (0);
	return bRet;
}
